﻿using System.Collections.Generic;

namespace yiCommerce.Core.Domain.Products
{
    public class ProductVariantAttribute:BaseEntity
    {
        /// <summary>
        /// Gets or sets the product variant identifier
        /// </summary>
        public virtual int ProductVariantId { get; set; }

        /// <summary>
        /// Gets or sets the product attribute identifier
        /// </summary>
        public virtual int ProductAttributeId { get; set; }

        /// <summary>
        /// Gets the product attribute
        /// </summary>
        public virtual ProductAttribute ProductAttribute { get; set; }

        /// <summary>
        /// Gets the product variant
        /// </summary>
        public virtual ProductVariant ProductVariant { get; set; }
        

        /// <summary>
        /// Gets or sets the attribute control type identifier
        /// </summary>
        public virtual AttributeControlType AttributeControlType { get; set; }

        private ICollection<ProductVariantAttributeValue> _productVariantAttributeValues;

        public virtual ICollection<ProductVariantAttributeValue> ProductVariantAttributeValues
        {
            get { return _productVariantAttributeValues ?? (_productVariantAttributeValues = new List<ProductVariantAttributeValue>()); }
            set { _productVariantAttributeValues = value; }
        }

    }
}